# eric7.VirtualEnv.VirtualenvAddEditDialog

Module implementing a dialog to enter the data of a virtual environment.

### Global Attributes

None

### Classes

VirtualenvAddEditDialog | Class implementing a dialog to enter the data of a virtual environment.

### Functions

None

## VirtualenvAddEditDialog

Class implementing a dialog to enter the data of a virtual environment.

### Derived from

QDialog, Ui_VirtualenvAddEditDialog

### Class Attributes

None

### Class Methods

None

### Methods

VirtualenvAddEditDialog | Constructor
__detectPythonInterpreter | Private method to search for a suitable Python interpreter inside an environment.
__updateOk | Private slot to update the state of the OK button.
getMetaData | Public method to retrieve the entered metadata.
on_environmentTypeComboBox_currentIndexChanged | Private slot handling the selection of a virtual environment type.
on_globalCheckBox_toggled | Private slot handling a change of the global check box state.
on_nameEdit_textChanged | Private slot to handle changes of the logical name.
on_pythonExecPicker_textChanged | Private slot to handle changes of the virtual environment interpreter.
on_targetDirectoryPicker_textChanged | Private slot to handle changes of the virtual environment directory.

### Static Methods

None

#### VirtualenvAddEditDialog (Constructor)

VirtualenvAddEditDialog(manager, metadata=None, baseDir="", parent=None, )

Constructor

manager (VirtualenvManager)
  reference to the virtual environment manager
metadata (VirtualenvMetaData (optional))
  object containing the metadata of the virtual environment (defaults to None)
baseDir (str (optional))
  base directory for the virtual environments (defaults to "")
parent (QWidget (optional))
  reference to the parent widget (defaults to None)

#### VirtualenvAddEditDialog.__detectPythonInterpreter

__detectPythonInterpreter(venvDirectory)

Private method to search for a suitable Python interpreter inside an environment.

venvDirectory (str)
  directory for the virtual environment

Return:
  detected Python interpreter or empty string

Return Type:
  str

#### VirtualenvAddEditDialog.__updateOk

__updateOk()

Private slot to update the state of the OK button.

#### VirtualenvAddEditDialog.getMetaData

getMetaData()

Public method to retrieve the entered metadata.

Return:
  metadata for the virtual environment

Return Type:
  VirtualenvMetaData

#### VirtualenvAddEditDialog.on_environmentTypeComboBox_currentIndexChanged

on_environmentTypeComboBox_currentIndexChanged(index)

Private slot handling the selection of a virtual environment type.

index (int)
  index of the selected virtual environment type

#### VirtualenvAddEditDialog.on_globalCheckBox_toggled

on_globalCheckBox_toggled(checked)

Private slot handling a change of the global check box state.

checked (bool)
  state of the check box

#### VirtualenvAddEditDialog.on_nameEdit_textChanged

on_nameEdit_textChanged(txt)

Private slot to handle changes of the logical name.

txt (str)
  current logical name

#### VirtualenvAddEditDialog.on_pythonExecPicker_textChanged

on_pythonExecPicker_textChanged(txt)

Private slot to handle changes of the virtual environment interpreter.

txt (str)
  virtual environment interpreter

#### VirtualenvAddEditDialog.on_targetDirectoryPicker_textChanged

on_targetDirectoryPicker_textChanged(txt)

Private slot to handle changes of the virtual environment directory.

txt (str)
  virtual environment directory

Up